Sections >

 

Data logger : Local temperature and pressure circuit

 


Data logger local temperature and pressure circuit

 

 

This circuit is logically part of the Data-Logger module:
• A DS18B20 temperature sensor interfacing digitally into the Data-Logger PICAXE. Note the pull-up resistor R1.

• An MPX4115 pressure sensor is an analogue device giving an output proportional to pressure. An LM358N dual Op-Amp is used to apply Offset and Gain to the DC signal that is output from the pressure sensor. If the output of the MPX4115 voltage was applied directly to the ADC input of the PICAXE the ADC would only be using a small portion of its full range and the resolution of readings will be poor. The OpAmp circuit has been taken from 'Bray's 1-Wire Barometer' information available on the Internet. Note the1uF capacitor on the output of the MPX4115 to smooth out any noise. Since designing this circuit I think an LM331 Voltage to frequency chip might give a simpler solution.

The LM358N is designed specifically to operate from a single power supply and for interfacing to digital systems. For barometric pressures the MPX4115 output voltage ranges from about 3.79 to 4.25 volts at sea level. R17 and R18 have a gain of 0.68 and bring the voltage output from the MPX4115 down to 2.6 to 2.9 volts, which is within the op-amps active input range.

Op-Amp 'A' is configured to apply an offset voltage adjusted by R20, and also a small amount of gain. Op-Amp 'B' applies variable gain, adjusted by R24.

The precise formulae for both stages are complex and I've written a supplementary article entitled WeatherMonitor Detailed Calculations, describing these calculations, along with an ExcelTM spreadsheet that allows the OpAmp stages to be calibrated.

Although the formulae are complex for these stages, as long as the barometer can be calibrated (probably as a one-off exercise) then I don't feel this complexity really matters, and to get a simpler calibration scheme would probably require more complex circuitry.

The DS18B20 provides a digital temperature resolution of 1/16-degree Celsius via the 'ReadTemp12' Basic command. The PICAXE chips do not offer full 1-wire support, so only a single DS18B20 can be connected to a PICAXE input. I've experimented by encasing the DS18B20 in a material (such a BluetacTM) that increases it's thermal mass and therefore provides a moving (exponential) average of temperature readings.

 

 

 

 


Sections >

 


Designed using CollectAny software www.CollectAny.com